﻿package mortal.game.view.copy.ChallengeCopy
{
    import Message.DB.Tables.*;
    import Message.Public.*;
    import __AS3__.vec.*;
    import com.gengine.global.*;
    import com.greensock.*;
    import com.greensock.easing.*;
    import com.mui.controls.*;
    import com.mui.core.*;
    import com.mui.utils.*;
    import extend.language.*;
    import fl.data.*;
    import flash.events.*;
    import flash.utils.*;
    import mortal.common.*;
    import mortal.common.display.*;
    import mortal.common.global.*;
    import mortal.component.gconst.*;
    import mortal.component.window.*;
    import mortal.game.cache.*;
    import mortal.game.events.*;
    import mortal.game.manager.*;
    import mortal.game.manager.msgTip.*;
    import mortal.game.mvc.*;
    import mortal.game.resource.*;
    import mortal.game.resource.info.item.*;
    import mortal.game.resource.tableConfig.*;
    import mortal.game.utils.*;
    import mortal.game.view.common.*;
    import mortal.game.view.common.display.*;
    import mortal.game.view.common.item.*;
    import mortal.game.view.copy.ChallengeCopy.data.*;
    import mortal.game.view.copy.ChallengeCopy.newView.*;
    import mortal.game.view.copy.groupCopy.view.*;
    import mortal.game.view.medal.*;
    import mortal.game.view.shopMall.data.*;
    import mortal.mvc.core.*;
    import mortal.mvc.interfaces.*;

    public class ChallengeCopyModule extends BaseWindow
    {
        private var _sectionRenderList:Vector.<ChallengeSectionRender>;
        private var _tabDifficulty:GTileList;
        private var _turnLeftBtn:GButton;
        private var _turnRightBtn:GButton;
        private var _sectionPanel:GSprite;
        private var _mask:GBitmap;
        private var _towerName:GImageBitmap;
        private var _canNotEnterBg:GImageBitmap;
        private var _sectionInfoPanel:ChallengeInfoPanel;
        private var _mopBtn:GButton;
        private var _mopNumberBox:NumberBox;
        private var _leftMopNum:GTextFiled;
        private var _medalSprite:GSprite;
        private var _txtBtnOpenMedalWin:GTextFiled;
        private var _medalLevel:BitmapNumberText;
        private var _medalItem:BaseItem;
        private var _txtBtnOpenShopBtn:GTextFiled;
        private var _peiceItem:BaseItem;
        private var _peiceNum:BitmapNumberText;
        private var _pageIndex:int;
        private var _towerIndex:int = 0;
        private var _selectIndex:int = 1;
        private var _maxTowerIndex:int;
        private var _currentLevelData:ChallengeData;
        private var _secTabIndex:int;

        public function ChallengeCopyModule(param1:ILayer = null)
        {
            this._sectionRenderList = new Vector.<ChallengeSectionRender>;
            super(param1);
            this.setSize(867, 590 + 37);
            title = Language.getString(35149);
            this.layer = LayerManager.windowLayer;
            return;
        }// end function

        override protected function createDisposedChildrenImpl() : void
        {
            super.createDisposedChildrenImpl();
            this._sectionInfoPanel = UICompomentPool.getUICompoment(ChallengeInfoPanel);
            this._sectionInfoPanel.x = 7;
            this._sectionInfoPanel.y = 35;
            this.addChild(this._sectionInfoPanel);
            this._sectionPanel = UICompomentPool.getUICompoment(GSprite);
            this._sectionPanel.x = 30;
            this._sectionPanel.y = 40;
            this._mask = GlobalClass.getBitmap(BitmapDataConst.LockedBMD);
            this._mask.x = 8;
            this._mask.y = 14;
            this._mask.width = 127;
            this._mask.height = 448;
            this._sectionPanel.addChild(this._mask);
            this._sectionPanel.mask = this._mask;
            this.pushUIToDisposeVec(UIFactory.bg(685, 528 + 37, 180, 53, this));
            this.pushUIToDisposeVec(UIFactory.bg(30, 40, 147, 500, this, ImagesConst.ChallengeSectionBg));
            this.pushUIToDisposeVec(UIFactory.bg(-8, 120, 80, 2, this._sectionPanel, ImagesConst.SplitLine));
            this.pushUIToDisposeVec(UIFactory.bg(-8, 220, 80, 2, this._sectionPanel, ImagesConst.SplitLine));
            this.pushUIToDisposeVec(UIFactory.bg(-8, 320, 80, 2, this._sectionPanel, ImagesConst.SplitLine));
            this.pushUIToDisposeVec(UIFactory.bg(-8, 420, 80, 2, this._sectionPanel, ImagesConst.SplitLine));
            this.pushUIToDisposeVec(UIFactory.gImageBitmap(ImagesConst.challengeCopyNewTxt_15, 668 + 25, 534 + 37, this));
            this.addChild(this._sectionPanel);
            this._tabDifficulty = UIFactory.tileList(255, 40, 400, 34, this);
            this._tabDifficulty.columnWidth = 118;
            this._tabDifficulty.rowHeight = 34;
            this._tabDifficulty.horizontalGap = 8;
            this._tabDifficulty.verticalGap = 5;
            this._tabDifficulty.setStyle("cellRenderer", ChallengeDicRender);
            this._tabDifficulty.configEventListener(Event.CHANGE, this.changeDiffHandler);
            this._towerName = UIFactory.gImageBitmap("", 18, 45, this);
            this._canNotEnterBg = UIFactory.gImageBitmap("", 69, 132, this);
            this._turnLeftBtn = UIFactory.gButton(Language.getString(35150), 45, 482, 52, 24, this, "RedButton");
            this._turnLeftBtn.configEventListener(MouseEvent.CLICK, this.changeTowerHandler);
            this._turnRightBtn = UIFactory.gButton(Language.getString(35151), 105, 482, 52, 24, this, "RedButton");
            this._turnRightBtn.configEventListener(MouseEvent.CLICK, this.changeTowerHandler);
            this._mopBtn = UIFactory.gButton(Language.getString(35152), 562 - 18, 535 + 37, 100, 25, this);
            this._mopBtn.configEventListener(MouseEvent.CLICK, this.mopSection);
            var _loc_1:* = GlobalStyle.textFormatLv.center();
            this._leftMopNum = UIFactory.gTextField("", 520, 560 + 37, 150, 20, this, _loc_1);
            this._medalSprite = UICompomentPool.getUICompoment(GSprite);
            this.addChild(this._medalSprite);
            this.pushUIToDisposeVec(UIFactory.bg(8, 528 + 37, 165, 53, this._medalSprite));
            this.pushUIToDisposeVec(UIFactory.gImageBitmap(ImagesConst.challengeCopyNewTxt_10, 10, 533 + 37, this._medalSprite));
            this.pushUIToDisposeVec(UIFactory.gImageBitmap(ImagesConst.challengeCopyNewTxt_12, 133, 548 + 37, this._medalSprite));
            _loc_1 = GlobalStyle.textFormatHuang2.center();
            _loc_1.underline = true;
            this._txtBtnOpenMedalWin = UIFactory.gTextField(Language.getString(35153), -40, 557 + 37, 170, 20, this._medalSprite, _loc_1);
            this._txtBtnOpenMedalWin.configEventListener(MouseEvent.CLICK, this.openMedalWin);
            this._medalLevel = UIFactory.bitmapNumberText(805 - 652, 549 + 37, "FightInfoNum.png", 12, 15, -1, this._medalSprite);
            this._medalItem = UICompomentPool.getUICompoment(BaseItem);
            this._medalItem.setItemStyle(ItemStyleConst.Small);
            var _loc_2:Boolean = false;
            this._medalItem.isDropAble = false;
            this._medalItem.isDragAble = _loc_2;
            this._medalItem.isShowLock = false;
            this._medalSprite.addChild(this._medalItem);
            this._medalItem.x = 740 - 652;
            this._medalItem.y = 534 + 37;
            this._txtBtnOpenShopBtn = UIFactory.gTextField(Language.getString(35154), 637, 557 + 37, 170, 20, this, _loc_1);
            this._txtBtnOpenShopBtn.configEventListener(MouseEvent.CLICK, this.openShop);
            this._peiceNum = UIFactory.bitmapNumberText(810, 549 + 37, "FightInfoNum.png", 12, 15, -1, this);
            this._peiceItem = UICompomentPool.getUICompoment(BaseItem);
            this._peiceItem.setItemStyle(ItemStyleConst.Small);
            this._peiceItem.isShowLock = false;
            this.addChild(this._peiceItem);
            this._peiceItem.x = 765;
            this._peiceItem.y = 534 + 37;
            this.createSectionList();
            this.updateTowerList();
            return;
        }// end function

        override protected function disposeImpl(param1:Boolean = true) : void
        {
            EffectManager.glowFilterUnReg(this._mopBtn);
            EffectManager.glowFilterUnReg(this._txtBtnOpenShopBtn);
            this._txtBtnOpenShopBtn.dispose(param1);
            this._txtBtnOpenShopBtn = null;
            this._tabDifficulty.dispose(param1);
            this._tabDifficulty = null;
            this._medalSprite.dispose(param1);
            this._medalSprite = null;
            this._peiceItem.dispose(param1);
            this._peiceItem = null;
            this._peiceNum.dispose(param1);
            this._peiceNum = null;
            this._turnLeftBtn.dispose(param1);
            this._turnLeftBtn = null;
            this._turnRightBtn.dispose(param1);
            this._turnRightBtn = null;
            this._sectionPanel.mask = null;
            this._sectionPanel.dispose(param1);
            this._sectionPanel = null;
            this._mask.dispose(true);
            this._mask = null;
            this._medalItem.dispose(param1);
            this._medalItem = null;
            this._canNotEnterBg.dispose(param1);
            this._canNotEnterBg = null;
            this._sectionInfoPanel.dispose(param1);
            this._sectionInfoPanel = null;
            this._towerName.dispose(param1);
            this._towerName = null;
            this._mopBtn.dispose(param1);
            this._mopBtn = null;
            this._leftMopNum.dispose(param1);
            this._leftMopNum = null;
            this._txtBtnOpenMedalWin.dispose(param1);
            this._txtBtnOpenMedalWin = null;
            this._medalLevel.dispose(param1);
            this._medalLevel = null;
            this._sectionRenderList.length = 0;
            this._currentLevelData = null;
            if (this._mopNumberBox)
            {
                this._mopNumberBox.dispose(param1);
                this._mopNumberBox = null;
            }
            super.disposeImpl(param1);
            return;
        }// end function

        private function createDicTab() : void
        {
            var _loc_2:Object = null;
            var _loc_3:int = 0;
            var _loc_1:* = new DataProvider();
            while (_loc_3 < 3)
            {
                
                _loc_2 = {tower:this._towerIndex, index:_loc_3};
                _loc_1.addItem(_loc_2);
                _loc_3++;
            }
            this._tabDifficulty.dataProvider = _loc_1;
            this._tabDifficulty.selectedIndex = 0;
            return;
        }// end function

        private function openMedalWin(event:MouseEvent) : void
        {
            Dispatcher.dispatchEvent(new DataEvent(EventName.MedalOpen));
            return;
        }// end function

        private function createSectionList() : void
        {
            var _loc_1:ChallengeSectionRender = null;
            var _loc_2:int = 0;
            while (_loc_2 < 4)
            {
                
                _loc_1 = UICompomentPool.getUICompoment(ChallengeSectionRender);
                _loc_1.x = 20;
                _loc_1.y = 23 + _loc_2 * 101;
                this._sectionPanel.addChild(_loc_1);
                _loc_1.configEventListener(MouseEvent.CLICK, this.selectSectionHandler);
                _loc_1.configEventListener(MouseEvent.MOUSE_OVER, this.showTween);
                _loc_1.configEventListener(MouseEvent.MOUSE_OUT, this.showTween);
                this.pushUIToDisposeVec(_loc_1);
                this._sectionRenderList.push(_loc_1);
                _loc_2++;
            }
            return;
        }// end function

        private function mopSection(event:MouseEvent) : void
        {
            Dispatcher.dispatchEvent(new DataEvent(EventName.ChallengeMopSection, this._currentLevelData.tChallengCopy));
            return;
        }// end function

        private function changeDiffHandler(event:Event) : void
        {
            this.updateSectionInfo();
            this._selectIndex = Cache.instance.copy.challengCopy.getHightestSectionByTowerAndDic(this._towerIndex, this._tabDifficulty.selectedIndex);
            this.setSelectedIndex(this._selectIndex);
            this.updateMop();
            return;
        }// end function

        private function updateAllInfo() : void
        {
            var _loc_1:Dictionary = null;
            var _loc_2:ChallengeData = null;
            var _loc_3:int = 0;
            this._canNotEnterBg.imgUrl = "";
            this._sectionPanel.filters = [];
            var _loc_4:Boolean = true;
            this._sectionPanel.mouseEnabled = true;
            this._sectionPanel.mouseChildren = _loc_4;
            if (this._towerIndex == this._maxTowerIndex)
            {
                _loc_1 = Cache.instance.copy.challengCopy.challengeDic;
                if (_loc_1[this._maxTowerIndex])
                {
                    _loc_2 = _loc_1[this._maxTowerIndex][0];
                    _loc_3 = Cache.instance.role.roleInfo.level;
                    if (_loc_3 < _loc_2.tChallengCopy.towerLimitLv)
                    {
                        this._sectionPanel.filters = [FilterConst.colorFilter2];
                        var _loc_4:Boolean = false;
                        this._sectionPanel.mouseEnabled = false;
                        this._sectionPanel.mouseChildren = _loc_4;
                        this._canNotEnterBg.imgUrl = "ExpeditionNotOpenBg_" + this._towerIndex + "T.png";
                    }
                }
            }
            this.createDicTab();
            this._tabDifficulty.selectedIndex = Cache.instance.copy.challengCopy.getHightestDiffByTower(this._towerIndex);
            this.updateSectionInfo();
            this.updateBtnVisbale();
            this._selectIndex = Cache.instance.copy.challengCopy.getHightestSectionByTower(this._towerIndex);
            this.setSelectedIndex(this._selectIndex);
            this.updateMop();
            return;
        }// end function

        private function selectSectionHandler(event:MouseEvent) : void
        {
            var _loc_3:int = 0;
            var _loc_2:* = event.currentTarget as ChallengeSectionRender;
            if (_loc_2.selected)
            {
                return;
            }
            while (_loc_3 < 4)
            {
                
                this._sectionRenderList[_loc_3].selected = false;
                _loc_3++;
            }
            _loc_2.selected = true;
            this.currentSectionData = _loc_2.challengData;
            return;
        }// end function

        private function set currentSectionData(param1:ChallengeData) : void
        {
            this._currentLevelData = param1;
            this._sectionInfoPanel.data = param1;
            this._towerName.imgUrl = "ExpeditionTowerName_" + this._currentLevelData.tChallengCopy.tower + "T.png";
            var _loc_2:* = MedalConfig.instance.getTmedalByCode(this._currentLevelData.tChallengCopy.medalId);
            if (_loc_2)
            {
                this._medalSprite.visible = true;
                this._medalLevel.text = "" + _loc_2.typeLevel;
                this._medalItem.source = MedalUtil.getMedalIconUrlByTmedal(_loc_2, 1);
                this._medalItem.toolTipData = _loc_2;
            }
            else
            {
                this._medalSprite.visible = false;
                this._medalLevel.text = "0";
                this._medalItem.source = null;
                this._medalItem.toolTipData = null;
            }
            this.updateMoneytype();
            return;
        }// end function

        private function updateMoneytype() : void
        {
            var _loc_3:Array = null;
            var _loc_4:ItemData = null;
            var _loc_5:BaseItem = null;
            var _loc_6:int = 0;
            var _loc_1:* = this._currentLevelData.tChallengCopy;
            var _loc_2:* = _loc_1.reward.split("&");
            while (_loc_6 < _loc_2.length)
            {
                
                if (_loc_2[_loc_6])
                {
                    _loc_3 = (_loc_2[_loc_6] as String).split("#");
                    _loc_4 = new ItemData(int(_loc_3[0]));
                    if (ItemsUtil.isEquipChip(_loc_4))
                    {
                        this._peiceItem.itemData = _loc_4;
                        this._secTabIndex = ShopUtil.getEquipChipSecTabIndexByItem(this._peiceItem.itemData);
                        break;
                    }
                }
                _loc_6++;
            }
            this.updateEquipChipNum();
            return;
        }// end function

        private function openShop(event:MouseEvent) : void
        {
            Dispatcher.dispatchEvent(new DataEvent(EventName.ShopMallChangeTabIndex, [ShopUtil.ShopTabChallenge, this._secTabIndex]));
            return;
        }// end function

        public function updateEquipChipNum(param1:Object = null) : void
        {
            var _loc_3:int = 0;
            var _loc_4:Array = null;
            var _loc_5:ItemData = null;
            var _loc_6:Boolean = false;
            var _loc_7:TShopSell = null;
            var _loc_2:* = this._peiceItem.itemData;
            if (_loc_2)
            {
                _loc_3 = Cache.instance.pack.backPackCache.getItemCountByItemCode(_loc_2.itemCode, true);
                this._peiceNum.text = "" + _loc_3;
                _loc_4 = ShopUtil.getItemListByTabNameAndSecIndex("m7", this._secTabIndex);
                for each (_loc_7 in _loc_4)
                {
                    
                    _loc_5 = new ItemData(_loc_7.itemCode);
                    if (ItemsUtil.isEquip(_loc_5))
                    {
                        if (_loc_7.repeatBuy || !_loc_7.repeatBuy && !ShopUtil.isHasBuyItem(_loc_5))
                        {
                            if (_loc_3 >= _loc_7.offer)
                            {
                                _loc_6 = true;
                                break;
                            }
                        }
                    }
                }
                if (_loc_6)
                {
                    EffectManager.glowFilterReg(this._txtBtnOpenShopBtn, null, 0.5, 5);
                }
                else
                {
                    EffectManager.glowFilterUnReg(this._txtBtnOpenShopBtn);
                }
            }
            return;
        }// end function

        private function updateBtnVisbale() : void
        {
            if (this._towerIndex != 1)
            {
                this._turnLeftBtn.mouseEnabled = true;
                this._turnLeftBtn.filters = [];
            }
            else
            {
                this._turnLeftBtn.mouseEnabled = false;
                this._turnLeftBtn.filters = [FilterConst.colorFilter2];
            }
            if (this._towerIndex != this._maxTowerIndex)
            {
                this._turnRightBtn.mouseEnabled = true;
                this._turnRightBtn.filters = [];
            }
            else
            {
                this._turnRightBtn.mouseEnabled = false;
                this._turnRightBtn.filters = [FilterConst.colorFilter2];
            }
            return;
        }// end function

        private function showTween(event:MouseEvent) : void
        {
            var _loc_2:* = event.currentTarget as ChallengeSectionRender;
            return;
        }// end function

        private function changeTowerHandler(event:MouseEvent) : void
        {
            var _loc_2:int = 0;
            if (event.currentTarget == this._turnLeftBtn)
            {
                this._towerIndex = this._towerIndex == 1 ? (1) : ((this._towerIndex - 1));
            }
            else if (event.currentTarget == this._turnRightBtn)
            {
                this._towerIndex = this._towerIndex == this._maxTowerIndex ? (this._maxTowerIndex) : ((this._towerIndex + 1));
            }
            this.updateAllInfo();
            while (_loc_2 < this._sectionRenderList.length)
            {
                
                if (!this._sectionRenderList[_loc_2].visible)
                {
                }
                else if (event.currentTarget == this._turnRightBtn)
                {
                    this._sectionRenderList[_loc_2].x = 20 + 110;
                    TweenMax.to(this._sectionRenderList[_loc_2], 0.3 * (_loc_2 * 0.5 + 1), {x:20, alpha:1, ease:Back.easeOut});
                }
                else if (event.currentTarget == this._turnLeftBtn)
                {
                    this._sectionRenderList[_loc_2].x = 20 - 110;
                    TweenMax.to(this._sectionRenderList[_loc_2], 0.3 * (_loc_2 * 0.5 + 1), {x:20, alpha:1, ease:Back.easeOut});
                }
                _loc_2++;
            }
            return;
        }// end function

        private function setSelectedIndex(param1:int) : void
        {
            var _loc_3:int = 0;
            var _loc_2:* = this._sectionRenderList[(param1 - 1)];
            while (_loc_3 < 4)
            {
                
                this._sectionRenderList[_loc_3].selected = false;
                _loc_3++;
            }
            _loc_2.selected = true;
            this.currentSectionData = _loc_2.challengData;
            return;
        }// end function

        public function updateSectionInfo() : void
        {
            var _loc_1:* = Cache.instance.copy.challengCopy.challengeDic;
            var _loc_2:* = _loc_1[this._towerIndex];
            var _loc_3:* = this._tabDifficulty.selectedIndex * 4;
            var _loc_4:* = _loc_3 + this._sectionRenderList.length;
            var _loc_5:int = 0;
            var _loc_6:* = _loc_3;
            while (_loc_6 < _loc_4)
            {
                
                this._sectionRenderList[_loc_5].challengData = _loc_2[_loc_6];
                _loc_5++;
                _loc_6++;
            }
            return;
        }// end function

        public function updateTowerList() : void
        {
            var _loc_3:ChallengeData = null;
            var _loc_4:Array = null;
            var _loc_1:* = Cache.instance.copy.challengCopy.challengeDic;
            var _loc_2:* = Cache.instance.role.roleInfo.level;
            this._maxTowerIndex = 0;
            for each (_loc_4 in _loc_1)
            {
                
                _loc_3 = _loc_4[0] as ChallengeData;
                if (_loc_2 >= _loc_3.tChallengCopy.towerLimitLv)
                {
                    var _loc_7:String = this;
                    var _loc_8:* = this._maxTowerIndex + 1;
                    _loc_7._maxTowerIndex = _loc_8;
                }
            }
            if (_loc_1[(this._maxTowerIndex + 1)])
            {
                (this._maxTowerIndex + 1);
            }
            return;
        }// end function

        public function changeToheightestLevel() : void
        {
            if (this._towerIndex == 0)
            {
                this._towerIndex = (this._maxTowerIndex - 1) > 0 ? ((this._maxTowerIndex - 1)) : (1);
            }
            this.updateAllInfo();
            return;
        }// end function

        public function setSelectLevelByTabAndIndex(param1:int, param2:int) : void
        {
            var _loc_3:Dictionary = null;
            var _loc_4:Array = null;
            if (param1 > this._maxTowerIndex)
            {
                this.changeToheightestLevel();
                return MsgManager.showRollTipsMsg(Language.getString(35155), MsgRollTipsType.msgRollTips3);
            }
            _loc_3 = Cache.instance.copy.challengCopy.challengeDic;
            _loc_4 = _loc_3[param1];
            if (param2 > _loc_4.length)
            {
                this.changeToheightestLevel();
                return MsgManager.showRollTipsMsg(Language.getString(35156), MsgRollTipsType.msgRollTips3);
            }
            this._towerIndex = param1;
            this._selectIndex = param2;
            this.createDicTab();
            this._tabDifficulty.selectedIndex = Cache.instance.copy.challengCopy.getHightestDiffByTower(this._towerIndex);
            this.updateSectionInfo();
            this.updateBtnVisbale();
            this.setSelectedIndex(this._selectIndex);
            return;
        }// end function

        public function updateInfo() : void
        {
            this.updateSectionInfo();
            this.setSelectedIndex(this._selectIndex);
            return;
        }// end function

        public function updateRecord(param1:SChallengeCopyRecords) : void
        {
            if (this._sectionInfoPanel)
            {
                this._sectionInfoPanel.updateRecord(param1);
            }
            return;
        }// end function

        public function updateLeftTime() : void
        {
            if (this._sectionInfoPanel)
            {
                this._sectionInfoPanel.updateLeftTime();
            }
            return;
        }// end function

        public function updateMop() : void
        {
            var _loc_1:int = 0;
            if ((this._currentLevelData.tChallengCopy.section - 1) % 4 + 1 == 1 && this._currentLevelData.passLevel == 0)
            {
                this._mopBtn.visible = false;
                this._leftMopNum.visible = false;
                if (this._mopNumberBox)
                {
                    this._mopNumberBox.dispose();
                    this._mopNumberBox = null;
                }
            }
            else
            {
                this._mopBtn.visible = true;
                this._leftMopNum.visible = true;
                if (ClockManager.instance.serverOpenDateNum == 1)
                {
                    _loc_1 = 0;
                }
                else
                {
                    _loc_1 = Cache.instance.copy.challengCopy.isMop ? (0) : (1);
                }
                if (_loc_1 > 0)
                {
                    this._mopBtn.enabled = true;
                    if (ClockManager.instance.getLoginDayNumByPassZero() == 1 && ClockManager.instance.serverOpenDateNum > 1 && Cache.instance.copy.challengCopy.getDataByTowerAndSection(1, 1).passLevel < 7)
                    {
                        EffectManager.glowFilterUnReg(this._mopBtn);
                        if (this._mopNumberBox)
                        {
                            this._mopNumberBox.dispose();
                            this._mopNumberBox = null;
                        }
                    }
                    else
                    {
                        EffectManager.glowFilterReg(this._mopBtn);
                        if (this._mopNumberBox == null)
                        {
                            this._mopNumberBox = UICompomentPool.getUICompoment(NumberBox);
                            this._mopNumberBox.x = this._mopBtn.x + this._mopBtn.width - 6;
                            this._mopNumberBox.y = this._mopBtn.y - 10;
                            this.addChild(this._mopNumberBox);
                        }
                        this._mopNumberBox.text = Language.getString(35131);
                    }
                }
                else
                {
                    EffectManager.glowFilterUnReg(this._mopBtn);
                    if (this._mopNumberBox)
                    {
                        this._mopNumberBox.dispose();
                        this._mopNumberBox = null;
                    }
                    if (Global.isDebugModle)
                    {
                        this._mopBtn.enabled = true;
                    }
                    else
                    {
                        this._mopBtn.enabled = false;
                    }
                }
                this._leftMopNum.text = Language.getStringByParam(35157, _loc_1);
            }
            return;
        }// end function

        public function get mapPanel() : GSprite
        {
            return this._sectionInfoPanel.mapPart;
        }// end function

    }
}
